<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta charset="utf-8">
  <title><!--{$lang.page.index.title}--></title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <link rel="stylesheet" href="/static/lay/layui/css/layui.css" media="all">
  <link rel="stylesheet" href="/static/lay/layui/index.css" media="all">
</head>
<body>

<div class="layui-fluid">
    <div class="layui-card">
      <div class="layui-card-body" style="padding: 15px;">
        <div class="layui-form-item" style="text-align: center;"><b><!--{$lang.page.mue.cert}--></b></div>
        <form name="addItem" method="post" action="" lay-filter="component-form-group" class="layui-form">
          <input type="hidden" value="<!--{$datainfo.uid}-->" name="uid">
          <input type="hidden" value="<!--{$datainfo.aid}-->" name="aid">

            <div class="layui-form-item">
            <div class="layui-inline">
              <label class="layui-form-label"><!--{$lang.page.table.account}--></label>
              <div class="layui-input-inline">
               <input type="text" name="username" value="<!--{$datainfo.username}-->" lay-verify="username"  class="layui-input readonly" readonly/>
              </div>
            </div>
            <div class="layui-inline">
              <label class="layui-form-label"><!--{$lang.page.table.realname}--></label>
              <div class="layui-input-inline">
               <input type="text" name="realname" value="<!--{$datainfo.realname}-->" lay-verify="realname"  class="layui-input readonly" readonly/>
              </div>
            </div>
            <div class="layui-inline">
              <label class="layui-form-label"><!--{$lang.page.public.email}--></label>
              <div class="layui-input-inline">
               <input type="text" name="email" value="<!--{$datainfo.email}-->"  placeholder="<!--{$lang.page.public.pinput}-->" autocomplete="off" class="layui-input readonly" readonly/>
              </div>
            </div>
            <div class="layui-inline">
             <label class="layui-form-label"><!--{$lang.page.table.phone}--></label>
              <div class="layui-input-inline">
                <input type="text" name="mobile" value="<!--{$datainfo.mobile}-->" placeholder="<!--{$lang.page.public.pinput}-->" autocomplete="off" class="layui-input readonly" readonly/>
              </div>
            </div>
            </div>

            <div class="layui-form-item showfk">
              <label class="layui-form-label"><!--{$lang.page.public.certinfo}--></label>
              <div class="layui-inline"  style="width:80%;">
                 
                <table class="layui-table" id="sharetable" lay-filter="table">
                <thead>
                    <tr>
                        <td width="30%"><!--{$lang.page.table.name}--></td>
                        <td width="70%"><!--{$lang.page.public.value}--></td>
                    </tr>
                </thead>
                <tbody>
                    <!--{if !empty($datainfo.certificate)}-->
                     <!--{foreach from=$datainfo.certificate item=item key=key}-->
                    <tr>
                      <td><input type="text" value="<!--{$key}-->" autocomplete="off" class="layui-input readonly" readonly/></td>
                      <td><input type="text" value="<!--{$item}-->" autocomplete="off" class="layui-input readonly" readonly/></td>
                    </tr>
                     <!--{/foreach}-->
                    <tr>
                      <td width="30%"><!--{$lang.page.table.img}--></td>
                      <td >
                        <!--{foreach from=$datainfo.cert_url item=item key=key}-->
                            <img src="<!--{$item}-->" style="width: 100px; height: 50px; cursor: pointer;" onclick="xadmin.showimg({url:'<!--{$item}-->',title:'<!--{$datainfo.realname}-->'});">
                        <!--{/foreach}-->
                      </td>
                    </tr>
                    <!--{/if}-->
                  </tbody>
                </table>
              </div>

            </div>

            <div class="layui-form-item">
            <label class="layui-form-label"><!--{$lang.page.table.notes}--></label>
            <div class="layui-input-block">
              <textarea  id="demo" name="notes" lay-verify="notes" placeholder="<!--{$lang.page.public.pinput}-->" class="layui-textarea"><!--{$datainfo.notes}--></textarea>
            </div>
          </div>

            <div class="layui-form-item">
            <label class="layui-form-label"><!--{$lang.page.table.examine}--></label>
            <div class="layui-input-block">
              <input type="radio" name="status" value="1" title="<!--{$lang.page.table.becert}-->" <!--{if $datainfo.status eq 1}--> checked<!--{/if}-->  >&nbsp;&nbsp;<input type="radio" name="status" value="2" title="<!--{$lang.page.table.bexamine}-->" <!--{if $datainfo.status eq 2}--> checked<!--{/if}-->>&nbsp;&nbsp;<input type="radio" name="status" value="3" title="<!--{$lang.page.table.pass}-->" <!--{if $datainfo.status eq 3}--> checked<!--{/if}-->>&nbsp;&nbsp;<input type="radio" name="status" value="4" title="<!--{$lang.page.table.gback}-->" <!--{if $datainfo.status eq 4}--> checked<!--{/if}-->>
            </div>
          </div>
                  
            <div class="layui-form-item layui-layout-admin">
              <div class="layui-footer" >
                <button class="layui-btn" type="button" lay-submit lay-filter="submit"><!--{$lang.page.public.submit}--></button>
                <button type="reset" class="layui-btn layui-btn-primary"><!--{$lang.page.public.reset}--></button>
                <button type="button" class="layui-btn layui-btn-primary" onClick="xadmin.close();" ><!--{$lang.page.table.back}--></button>
              </div>
            </div>
        </form>
      </div>
    </div>

    </div>

<script src="/static/lay/layui/layui.js"></script>
  <script type="text/javascript">
    layui.config({
     base: '/static/lay/' //静态资源所在路径
   }).extend({
     xadmin: 'lib/xadmin' //弹窗
   }).use(['jquery', 'layer','xadmin', 'form'], function(){
    var form = layui.form;
     form.render(null, 'component-form-group');
     /* 自定义验证规则 */
    form.verify({
      username: function(value){
        if(value.length < 1){
          return '<!--{$lang.page.table.account}--> <!--{$lang.page.public.nocontent}-->';
        }
      }
      ,notes: function(value){
        if(value.length > 200){
          return '<!--{$lang.page.public.notesinfo}-->';
        }
      }

    });
    form.on('submit(submit)', function (data) {
        $.post('#',data.field,function(res){
            if(res.code == 200){
                layer.msg(res.msg);
                setTimeout(() => {
                    window.parent.location.reload();
                    xadmin.close();
                }, 1000);
            }else{
                layer.msg(res.msg);
            }
        })
        return false; //阻止表单跳转。如果需要表单跳转，去掉这段即可。
    });

  });
  </script>
</body>
</html>

